//
//  SWCouponMenueView.m
//  YiYueHairdresser
//
//  Created by Sky on 2018/10/30.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "SWCouponMenueView.h"
@interface SWCouponMenueView()
@property(nonatomic, strong) UIButton *oldbtn;
@end

@implementation SWCouponMenueView

- (void)awakeFromNib {
    [super awakeFromNib];
    self.oneBtn.layer.masksToBounds = YES;
    self.oneBtn.layer.cornerRadius = 3;
    self.oneBtn.layer.borderColor =UIColor.lightGrayColor.CGColor;
    self.oneBtn.layer.borderWidth = 0.5;
    
    self.twobtn.layer.masksToBounds = YES;
    self.twobtn.layer.cornerRadius = 3;
    self.twobtn.layer.borderColor =UIColor.lightGrayColor.CGColor;
    self.twobtn.layer.borderWidth = 0.5;
    
}
- (IBAction)clickAction:(UIButton *)sender {
    
    [sender setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
    sender.backgroundColor = UIColor.orangeColor;
    sender.layer.borderWidth = 0.001;
    
    if (_oldbtn) {
    [_oldbtn setTitleColor:UIColor.grayColor forState:UIControlStateNormal];
    _oldbtn.backgroundColor = UIColor.whiteColor;
    _oldbtn.layer.borderWidth = 0.5;
    }
    _oldbtn = sender;
    self.SelectBackBlock(sender.tag);
}

@end
